package com.rdExpenses.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.base.common.service.CrudService;
import com.company.model.CompanyEmployee;
import com.rdExpenses.dao.ExpenseTypeMapper;
import com.rdExpenses.model.ExpenseType;
import com.rdExpenses.service.ExpenseTypeService;

@Service
public class ExpenseTypeServiceImpl extends
		CrudService<ExpenseTypeMapper, ExpenseType> implements
		ExpenseTypeService {

	public List<ExpenseType> findExpenseTypeList() throws Exception {
		Map<String, String> params = new HashMap<String, String>();
		String sql = "SELECT * from expense_type t where t.del_flag = '0'";
		List<ExpenseType> list = this.getList(sql, ExpenseType.class, params);
		return list;
	}
	
	public ExpenseType findExpenseTypeById(String id) throws Exception {
		return this.get(id);
	}

}
